package com.zhijian.warehouse.manage.dao;

import com.zhijian.warehouse.manage.entity.po.Warehouse;
import com.zhijian.warehouse.manage.entity.vo.request.WarehouseSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.StoreWarehouseVo;
import com.zhijian.warehouse.manage.entity.vo.response.WarehouseVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface WarehouseMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Warehouse record);

    int insertSelective(Warehouse record);

    Warehouse selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Warehouse record);

    int updateByPrimaryKey(Warehouse record);

    /**
     * 查询总数
     *
     * @param warehouseSearchVo
     * @return
     */
    int count(WarehouseSearchVo warehouseSearchVo);

    /**
     * 查询列表
     *
     * @param warehouseSearchVo
     * @return
     */
    List<WarehouseVo> selectList(WarehouseSearchVo warehouseSearchVo);

    /**
     * 查询单个
     *
     * @param warehouseSearchVo
     * @return
     */
    WarehouseVo selectOne(WarehouseSearchVo warehouseSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    WarehouseVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param warehouseSearchVo
     * @return
     */
    void deleteByCondition(WarehouseSearchVo warehouseSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<Warehouse> entities);

    /**
     * 根据CreateUserId查询列表
     *
     * @param createUserId
     * @return
     */
    List<WarehouseVo> selectListByCreateUserId(Long createUserId);

    /**
     * 根据UpdateUserId查询列表
     *
     * @param updateUserId
     * @return
     */
    List<WarehouseVo> selectListByUpdateUserId(Long updateUserId);

    /**
     * 根据ID列表查询仓库列表
     *
     * @param warehouseIdsList
     * @return
     */
    List<StoreWarehouseVo> selectByIds(@Param("list") List<Long> warehouseIdsList);
}
